home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 June / Macworld (1998-06).dmg / Shareware World / Utilities / DTP / scorpbar / Scripts / ReadMe - BarCode Excel < prev    next >
Text File  |  1998-03-16  |  2KB  |  49 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. BarCode Excel
  13.  
  14. This AppleScript™ takes the contents of a cell in a Microsoft Excel™ spreadsheet and places the BarCode equivalent graphic into a picture box on the same sheet:
  15.  
  16. tell application "Microsoft Excel"
  17.     Activate
  18.     Select Range "R1C1"
  19.     set FormulaR1C1 of ActiveCell to "'5012345678900"
  20.     Select Range "R1C1"
  21.     CopyObject Selection
  22. end tell
  23. tell application "Scorpion BarCode"
  24.     activate
  25.     macro "MENU Encode EAN-13"
  26.     macro "CLCK Field  1"
  27.     macro "MENU Edit Paste Data"
  28.     macro "BUTN Press Clip"
  29.     macro "BUTN Press OK"
  30.     macro "MENU File Quit"
  31.     quit
  32. end tell
  33. tell application "Microsoft Excel"
  34.     Activate
  35.     Select Range "R1C1"
  36.     set FormulaR1C1 of ActiveCell to ""
  37.     paste
  38.     Select DrawingObject "Picture 1" of ActiveSheet
  39.     set LineStyle of Border of Selection to xlNone
  40.     set Shadow of Selection to false
  41.     set ColorIndex of Interior of Selection to xlAutomatic
  42.     set Left of Selection to 190.0
  43.     set Top of Selection to 77.0
  44.     Select Range "R1C1"
  45. end tell
  46.  
  47. The script was created using the ScriptEditor™ program supplied with AppleScript™ system software. The Scorpion BarCode software supports the Script Recording feature within ScriptEditor™ enabling you to create scripts easily and quickly!
  48.  
  49. Please note that references to various known trademarks or registered trademarks of Apple Computer Inc and Microsoft Corporation have been made in this document. Such references do not imply any endorsement of, or other affiliations with, Scorpion Research Limited or vice versa. The reference to the known trademarks or registered trademarks names is in an editorial fashion only, and to the benefit of the trademark holder and owner, with no intention of infringement of the trademark.